package appapi.dto;

import appapi.common.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author djq
 * @date 2023/6/7 9:19
 * @description:
 */
@Data
public class UpdateProjectDto extends BaseEntity {
    /**
     * 项目ID
     */
    @ApiModelProperty(value = "项目ID")
    private Long projId;

    /**
     * 项目名称
     */
    @ApiModelProperty(value = "项目名称",required = true)
    @NotNull(message = "项目名称不能为空")
    @NotBlank(message = "项目名称不能为空")
    @Length(max = 64)
    private String projName;

    /**
     * 项目编码
     */
    @ApiModelProperty(value = "项目编码")
    private String projCode;


    /**
     * 所属机构
     */
    @ApiModelProperty(value = "所属机构 = 后台传给前端项目id",required = true)
    @NotNull(message = "所属机构不能为空")
    private Long orgaId;

    /**
     * 所属机构父级id
     */
    @ApiModelProperty(value = "所属机构父级id(如无上级则传0) = 后台传给前端的pid")
    private Long orgaPid;

    /**
     * 所属机构父级路径
     */
    @ApiModelProperty(value = "所属机构父级路径(如无上级则不传)")
    private String orgaPPath;

    /**
     * 所属区域
     */
    @ApiModelProperty(value = "所属区域",required = true)
    @NotNull(message = "所属区域不能为空")
    private Long areaId;

    /**
     * 所属父级机构
     */
    @ApiModelProperty(value = "所属父级机构",required = true)
    @NotNull(message = "所属父级机构不能为空")
    private Long areaPid;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址",required = true)
    @NotNull(message = "地址不能为空")
    @NotBlank(message = "地址不能为空")
    @Length(max = 100)
    private String projAddress;

    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private Double projLong;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private Double projLot;

    /**
     * 负责人
     */
    @ApiModelProperty(value = "负责人")
    private String projHead;

    /**
     * 项目状态 0 正常 1停工 2完结
     */
    @ApiModelProperty(value = "项目状态 0 正常 1停工 2完结",required = true)
    @NotNull(message = "项目状态不能为空")
    private Integer projState;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String projNote;

}
